package structures;

import java.util.List;
import structures.Status;
import Professions.Profession;
import java.io.Serializable;

/**
 * A subclass of Passenger that keeps control of the player's
 * stats.
 * @author Andy Van Deventer
 *
 */
public class Player extends Passenger implements Serializable{
	Profession job;
	List<Passenger> crew;
	Spaceship ship;
	
	/**
	 * The constructor. Sets the variables based on the parent class
	 * @param name name of player
	 * @param pStatus	status of player
	 */
	public Player(String name, Status pStatus) {
		super(name, pStatus);
	}
	
	public Player(String name, Status pStatus, Profession playerJob) {
		super(name, pStatus);
		job = playerJob;
	}

	/**
	 * A simple setter for the player's profession
	 * @param playerJob
	 */
	public void setProfession(Profession playerJob){
		job = playerJob;
	}
	
	public Profession getProfession(){
		return job;
	}
	
	/**
	 * Allows the player to do different things based
	 * on the situation at hand
	 * @param task
	 */
	public void performTask(int task){
		/*switch(task){
		case 1: 
			job.fixEngines(ship);
			break;
		case 2:
			job.fixPeople(crew);
			break;
		case 3:
			job.freezePeople(crew);
			break;
		case 4:
			job.killPeople(crew, ship);
			break;
		}*/
	}
}
